import {
  BwCustomComSoltTypeEnum,
  BwCustomComNodeAttrDataTypeEnum,
  BwCustomComNodeAttrFromTypeEnum,
  BwCustomComSlotParamDataTypeEnum,
  type BwCustomComNodeAttrModel,
  type BwCustomComNodeEnableSlotInfoModel,
} from '../../../../render/models'

const attrs: Record<string, BwCustomComNodeAttrModel> = {
  darkMode: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
  gradientColor: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.array,
    constValue: '["#f6efa6","#d88273","#bf444c"]',
  },
  color: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.array,
    constValue:
      '["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"]',
  },
  textStyle: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.object,
    constValue:
      '{"fontFamily":"Microsoft YaHei","fontSize":12,"fontStyle":"normal","fontWeight":"normal"}',
  },
  stateAnimation: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.object,
    constValue: '{"duration":300,"easing":"cubicOut"}',
  },
  animation: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: 'auto',
  },
  animationDuration: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '1000',
  },
  animationDurationUpdate: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '500',
  },
  animationEasing: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: 'cubicInOut',
  },
  animationEasingUpdate: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: 'animationEasingUpdate',
  },
  animationThreshold: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '2000',
  },
  progressiveThreshold: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '3000',
  },
  progressive: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '400',
  },
  hoverLayerThreshold: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '3000',
  },
  useUTC: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
  yAxis: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.object,
    constValue: '{"type":"value"}',
  },
  xAxis: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.object,
    constValue:
      '{"type":"category","data":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}',
  },
  series: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.object,
    constValue: '[{"data":[120,200,150,80,70,110,130],"type":"bar"}]',
  },
  height: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '350px',
  },
}

const slotList: Array<BwCustomComNodeEnableSlotInfoModel> = []

export const chartBarOptions = {
  attrs,
  slotList,
}
